package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.model.CompanyModel;

/**
 * 服务逻辑层
 * 1.来源于dao层
 * 2.创建dao层
 * 3.封装数据
 */
public class CompanyService implements ICompanyService{
    private CompanyModel companyModel = new CompanyModel();

    public CompanyModel getCompanyModel() {
        //        属于逻辑关系  或者属于封装
        CompanyDao companyDao = new CompanyDao();
        companyModel.setLogo(companyDao.logo);
        companyModel.setPhone(companyDao.phone);
        companyModel.setNet(companyDao.net);
        companyModel.setEmail(companyDao.email);
        companyModel.setLinePhone(companyDao.linePhone);
        companyModel.setAddress(companyDao.address);
        companyModel.setVersion(companyDao.version);
        return companyModel;
    }
}
